﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.ServiceModel.Web;
using System.Text;
using Somnus.Contracts;
using Somnus.Services.Data;

namespace Somnus.Services
{
    public class WirelessAPService : IWirelessAPJsonService, IWirelessAPXmlService
    {
        public WirelessAP GetMostRelativeWirelessAPData(WirelessAP wirelessap)
        {
            WirelessAP ap = new WirelessAP { ssid = "name", level = 1, posX = 1, posY = 0, gid = 0, mac = "7dceaa4d5f6a" };
            return DBOperation.GetMostRelativeRecord(ap);
            
            
        }
        public bool InsertWirelessAPData(WirelessAP wirelessap)
        {
            WirelessAP ap = new WirelessAP { ssid = "name", level = 1, posX = 1, posY = 0, gid = 0, mac = "7dceaa4d5f6a" };
            return DBOperation.InsertNewRecord(ap);
            
        }
        public string SendMessage(string Message)
        {
            //Console.Write((Message));
            return Message;
        }
        public WirelessAP GetTestWirelessAPData()
        {
            return new WirelessAP { ssid = "name", level = 1, posX = 1, posY = 0, gid = 0, mac = "7dceaa4d5f6a" }; ;
        }
    }
}
